import { createRouter, createWebHistory } from 'vue-router'
import LoginView from '../views/LoginView.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: LoginView
    },
    {
      path: '/UserList',
      name: 'UserList',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/UserList.vue'),
      children: [
        {
          path: '/UserList/user',
          name: 'User',
          component: () => import('../views/system(系统管理)/UserView.vue'),
        },
        {
          path: '/UserList/role',
          name: 'Role',
          component: () => import('../views/system(系统管理)/RoleView.vue'),
        },
        {
          path: '/UserList/production',
          name: 'Production',
          component: () => import('../views/production(生产管理)/AddProduction.vue'),
        },
        {
          path: '/UserList/productionDesc',
          name: 'ProductionD',
          component: () => import('../views/production(生产管理)/ProductionDesc.vue'),
        },
        {
          path: '/UserList/ProduceShow',
          name: 'ProductionS',
          component: () => import('../views/production(生产管理)/ProduceShow.vue'),
        },
        {
          path: '/UserList/saleOutshow',
          name: 'SaleOutshowView',
          component: () => import('../views/sales(销售管理)/SaleOutshowView.vue'),
        },
        {
          path: '/UserList/sale',
          name: 'Sale',
          component: () => import('../views/sales(销售管理)/SaleView.vue'),
        },
        {
          path: '/UserList/saleshow',
          name: 'SaleShow',
          component: () => import('../views/sales(销售管理)/SaleShowView.vue'),
        },
        {
          path: '/UserList/saleshow',
          name: 'SaleShow',
          component: () => import('../views/sales(销售管理)/SaleShowView.vue'),
        },
        {
          path: '/UserList/addbomInfo',
          name: 'Addbominfo',
          component: () => import('../views/product(产品管理)/AddBomInfo.vue'),
        },
        {
          path: '/UserList/showbomInfo',
          name: 'Showbominfo',
          component: () => import('../views/product(产品管理)/ShowBomInfo.vue'),
        },
        {
          path: '/UserList/GetBomById',
          name: 'bomInfo',
          component: () => import('../views/product(产品管理)/GetBomById.vue'),
        },
        {
          path: '/UserList/ShowBomDetail',
          name: 'bomdetail',
          component: () => import('../views/product(产品管理)/ShowBomDetail.vue'),
        },
        {
          path: '/UserList/income',
          name: 'IncomeView',
          component: () => import('../views/income(收入管理)/IncomeView.vue'),
        },
        {
          path: '/UserList/EdititionalExpenditure',
          name: 'edititionalExpenditureView',
          component: () => import('../views/income(收入管理)/EdititionalExpenditureView.vue'),
        },
        {
          path: '/UserList/incomeshow',
          name: 'IncomeShowView',
          component: () => import('../views/income(收入管理)/IncomeShowView.vue'),
        },
        {
          path: '/UserList/matel',
          name: 'matelView',
          component: () => import('../views/product(产品管理)/matelView.vue'),
        },
        {
          path: '/UserList/mateshow',
          name: 'mateshowView',
          component: () => import('../views/product(产品管理)/mateshowView.vue'),
        },
        {
          path: '/UserList/outtab',
          name: 'outtabView',
          component: () => import('../views/outtabs(库存管理)/outtabView.vue'),
        },
        {
          path: '/UserList/outtabshow',
          name: 'outtabshowView',
          component: () => import('../views/outtabs(库存管理)/outtabshowView.vue'),
        },
        {
          path: '/UserList/out',
          name: 'outView',
          component: () => import('../views/outtabs(库存管理)/outView.vue'),//出库添加
        },
        {
          path: '/UserList/outshow',
          name: 'outshowView',
          component: () => import('../views/outtabs(库存管理)/outshowView.vue'),//出库管理显示
        },
        {
          path: '/UserList/outById',
          name: 'outById',
          component: () => import('../views/outtabs(库存管理)/GetOutById.vue'),//出库管理编辑
        },
        {
          path: '/UserList/AdditionalExpenditure',
          name: 'AdditionalExpenditureView',
          component: () => import('../views/income(收入管理)/AdditionalExpenditureView.vue'),
        },
        {
          path: '/UserList/AdditionalExpenditure',
          name: 'AdditionalExpenditureView',
          component: () => import('../views/income(收入管理)/AdditionalExpenditureView.vue'),
        },
        {
          path: '/UserList/showitionalExpenditure',
          name: 'showitionalExpenditureView',
          component: () => import('../views/income(收入管理)/showitionalExpenditureView.vue'),
        },
        {
          path: '/UserList/EditIncome',
          name: 'EditIncomeView',
          component: () => import('../views/income(收入管理)/EditIncomeView.vue'),
        },
        {
          path: '/UserList/saledetails',
          name: 'SaleDetailsView',
          component: () => import('../views/sales(销售管理)/SaleDetailsView.vue'),
        },
        {
          path: '/UserList/bpnmDataPanel',
          name: 'BpnmDataPanel',
          component: () => import('../views/logicflow(工作流引擎)/logicflowCustom.vue'),
        },
        // {
        //   path: '/UserList/outById',
        //   name: 'outById',
        //   component: () => import('../views/outtabs(库存管理)/GetOutById.vue'),//出库编辑
        // },
        {
          path: '/UserList/intputById',
          name: 'intputById',
          component: () => import('../views/outtabs(库存管理)/outtabViewUpdate.vue'),//入库编辑
        },
        {
          path: '/UserList/product',
          name: 'product',
          component: () => import('../views/product(产品管理)/AddProduct.vue'),
        },
        {
          path: '/UserList/productList',
          name: 'productList',
          component: () => import('../views/product(产品管理)/ProductList.vue'),
        },
        {
          path: '/UserList/productEdit',
          name: 'productEdit',
          component: () => import('../views/product(产品管理)/AddProductUpdate.vue'),
        },
        {
          path: '/UserList/productDesc',
          name: 'productDesc',
          component: () => import('../views/product(产品管理)/ProductDetails.vue'),
        },
        {
          path: '/UserList/eachers',
          name: 'eachers',
          component: () => import('../views/staging(工作台)/EachearsView.vue'),
        },

      ]
    },
  ]
})

export default router
